home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Powervisor v1.10b disk2.adf / InstallingPowerVisor < prev    next >
Text File  |  1991-09-29  |  31KB  |  861 lines

  1. *----------------------------------*
  2. * Tutorial : installing PowerVisor * Sun Sep 29 09:35:01 1991
  3. *----------------------------------*
  4.  
  5. ===================== Commands used in this tutorial =========================
  6.  
  7.    mode        Set PowerVisor preferences
  8.    prefs       Set preferences
  9.    screen      Set PowerVisor on another screen
  10.  
  11. ===================== Functions used in this tutorial ========================
  12.  
  13.  
  14. ============================== Introduction ==================================
  15.  
  16. At this moment (after you have read the 'GettingStarted', the 'Expressions'
  17. and the 'Screen' chapters) you are probably ready to ²customize PowerVisor.
  18. This is a complex business and you will probably have to change some
  19. parameters later when you use PowerVisor.
  20.  
  21.  
  22. =========================== The 'mode' command ===============================
  23.  
  24. With the 'mode' command you can set some parameters. The 'mode' command
  25. expects any number of keywords. These keywords need not be in any
  26. particular order.
  27. The following keywords are supported :
  28.  
  29.    pal         set ¹monitor to ¹pal (only AmigaDOS 2.0)
  30.                the ¹non-interlaced resolution is 640x256 and the
  31.                ¹interlaced resolution is 640x512. This resolution will be
  32.                bigger if you use ¹overscan.
  33.    ntsc        set monitor to ¹ntsc (only AmigaDOS 2.0)
  34.                non-interlaced : 640x200
  35.                interlaced : 640x400
  36.    vga         set monitor to ¹vga (only AmigaDOS 2.0 and new denise)
  37.                non-interlaced : 640x480
  38.                interlaced : 640x960
  39.    viking      set monitor to ¹a2024 (only AmigaDOS 2.0)
  40.                resolution : 1024x1008
  41.  
  42.    lace        use ¹interlace
  43.    nolace      no interlace (default)
  44.  
  45.    fancy       use ²two bitplanes for the PowerVisor screen (default)
  46.    nofancy     use only ²one bitplane
  47.  
  48.    sbottom     include the ²size gadget in the ²bottom border. This means that
  49.                you loose a line but you gain some columns (default)
  50.    nosbottom   include the size gadget in the ²right border of the window.
  51.                You loose some columns but you gain a line or so
  52.  
  53.    space       add a space after a ²snapped word (default)
  54.    nospace     don't add a space. Simply snap the word as it is
  55.  
  56.    lonespc     snap a space if you click on an empty place in a logical
  57.                window
  58.    nolonespc   don't snap a space (default)
  59.  
  60.    shex        ³show hex words when ²disassembling instructions. The
  61.                disadvantage is that these words could overwrite the right
  62.                side of the ¹symbolname if present (default)
  63.    noshex      don't show hex words. Symbols will be completely visible
  64.  
  65.    dec         display all printed ¹integers as ²decimal only
  66.    hex         display all printed integers as ²hexadecimal only
  67.    hexdec      first display hex, than display decimal (default)
  68.  
  69.    more        enable ²-MORE- check for the 'Main' ²logical window (default)
  70.    nomore      disable -MORE- check
  71.  
  72.    auto        perform an ²automatic list whenever the ²current list changes
  73.    noauto      don't do this (default)
  74.  
  75.    byte        ²list memory as ¹bytes (for the 'memory' command)
  76.    word        list memory as ¹words
  77.    long        list memory as ¹longs (default)
  78.    ascii       list memory as ¹ascii
  79.  
  80.    fb          ¹feedback each command as it is typed in by the user on
  81.                the current logical window (default)
  82.    nofb        don't do this
  83.  
  84.    patch       ¹patch the Exec AddTask function. When this function is
  85.                patched by PowerVisor ¹crashtrapping will work better
  86.                for all new tasks created after the patch is applied.
  87.                This is recommended if you use ²resident breakpoints
  88.                (see the 'Debug' file). Note that it is not safe to
  89.                run other debuggers (like ¹CodeProbe or ¹MonAm) when
  90.                the patch is applied. They will probably crash when
  91.                you try to trace with them. There will (probably) be
  92.                no problems if you start the other debugger and load
  93.                the debug program with this debugger BEFORE you
  94.                apply the patch (before you start PowerVisor or before
  95.                you type 'mode patch'). (default)
  96.    nopatch     Don't patch the ²Exec AddTask function. When the ¹AddTask
  97.                function is not patched, PowerVisor will trap a crash
  98.                a bit later (too late if you plan to use resident
  99.                breakpoints). With the patch applied PowerVisor traps
  100.                crashes just on the spot while if the patch is not
  101.                applied PowerVisor will only trap the crash just before
  102.                the ¹guru would normally arrive (you will even have to
  103.                press 'cancel' on the ²'task-held' requester before
  104.                PowerVisor notices the crash). But 'mode nopatch' is
  105.                the only safe way to run ²other debuggers concurrently
  106.                with PowerVisor.
  107.  
  108. Example, to set everything other than default you can use :
  109.  
  110. < mode lace fancy nospace lonespc noshex dec nomore auto byte nofb nopatch
  111. <      <enter>
  112.  
  113. All the parameters set with the 'mode' command will be saved with the
  114. 'saveconfig' command (see later).
  115.  
  116.  
  117. =========================== The 'prefs' command ==============================
  118.  
  119. Using the 'prefs' command you can install some additional parameters.
  120. All parameters installable with the 'prefs' command will be saved when
  121. you use 'saveconfig'.
  122.  
  123.  
  124. =============== The maximum number of lines in the history ===================
  125.  
  126. Using 'prefs history' you can get or set the maximum number of lines in the
  127. history. The default is 20.
  128.  
  129. < prefs history <enter>
  130. > 00000014 , 20
  131.  
  132. You can set another value with :
  133.  
  134. < prefs history 500 <enter>
  135.  
  136. Note that the ²history buffer is dynamic. If there are 10 lines in the history
  137. buffer you only loose memory for 10 lines even if the maximum number of lines
  138. is 500.
  139.  
  140. The command also clears the history buffer.
  141.  
  142.  
  143. =========================== Some standard keys ===============================
  144.  
  145. Using 'prefs key' you can get or set ¹keycodes for standard keys. The
  146. following keys are supported :
  147.  
  148.    nr name                 default key           code    qualifier
  149.    -------------------------------------------------------------------------
  150.    0  interrupt key        <esc>                 045     0
  151.    1  hot key              <r-shift>+<r-alt>+'/' 03A     022
  152.    2  pause key            <r-alt>+<help>        05F     020
  153.    3  cycle active logwin  <tab>                 042     0
  154.    4  history up           <arrow up>            04C     0
  155.    5  history down         <arrow down>          04D     0
  156.  
  157. You can look at the current values with :
  158.  
  159. < prefs key 2 <enter>
  160. > 005F 0020
  161.  
  162. Or you can set it to other values with :
  163.  
  164. < prefs key 0 16 0 <enter>
  165.  
  166. This command will set the interrupt key to the 'q' key (or the 'a' key
  167. if you have an AZERTY keyboard). This is only an example. I recommend
  168. that you choose better keys :-)
  169.  
  170. Here are some codes that are often used :
  171.  
  172.    <esc>                      045
  173.    <tab>                      042
  174.    <F1>                       050
  175.    .                          .
  176.    .                          .
  177.    .                          .
  178.    <F10>                      059
  179.    <backspace>                041
  180.    <help>                     05F
  181.    <del>                      046
  182.    <up>                       04C
  183.    <down>                     04D
  184.    <left>                     04F
  185.    <right>                    04E
  186.    <return>                   044
  187.    <enter> (numeric keypad)   043
  188.  
  189. Here are the ¹qualifers. You must add two qualifiers if you want to use
  190. a combination :
  191.  
  192.    Left shift              0001
  193.    Right shift             0002
  194.    Capslock                0004  (this one is ignored by PowerVisor)
  195.    Control                 0008
  196.    Left alt                0010
  197.    Right alt               0020
  198.    Left Amiga              0040
  199.    Right Amiga             0080
  200.  
  201.  
  202. ======================== Setting some startup bits ===========================
  203.  
  204. With 'prefs startup' you can get or set some ²startup bits. The startup
  205. variable is a longword. Only two bits are supported at this time.
  206.  
  207. bit 0     if true we start PowerVisor on the ²workbench screen
  208.           if this bit is true we ignore bit 1
  209. bit 1     if true we open the 'Main' physical window on a ¹non-backdrop
  210.           window instead of a ²backdrop window. This is equivalent to
  211.           the 'screen' command with argument 0.
  212.  
  213. Default is 0.
  214.  
  215. < prefs startup <enter>
  216. > 00000000 , 0
  217.  
  218. To set another value use :
  219.  
  220. < prefs startup 1 <enter>
  221.  
  222. You need to quit PowerVisor and start it again to see the result of this
  223. command.
  224.  
  225.  
  226. ===================== Setting the startup window size ========================
  227.  
  228. With 'prefs window' you can define the size of the 'Main' physical window
  229. to be used when it is not a ²backdrop window (only just after startup).
  230. This value is thus only used if the ²'startup' variable (see the previous
  231. section) is either 1 or 2.
  232.  
  233. The default is (0,0,640,200). Which is x = 0, y = 0, width = 640 and
  234. height = 200.
  235. You must not worry if the size is too big. PowerVisor will check and
  236. make the window smaller if it would not fit on the screen.
  237.  
  238. < prefs window <enter>
  239. > 0 0 640 200
  240.  
  241. Set new values with :
  242.  
  243. < prefs window 0 200 640 200 <enter>
  244.  
  245. You need to quit PowerVisor and start it again to see the result of this
  246. command.
  247.  
  248.  
  249. ===================== Setting the startup screen size ========================
  250.  
  251. With 'prefs screen' you can define the width and height of the PowerVisor
  252. screen. If you have AmigaDOS 2.0 you can use any size for the screen. If
  253. this size is big you can scroll by moving the mouse out of the visible part
  254. of the screen.
  255.  
  256. The default is (65535,65535) (or (-1,-1) as words).Which means that
  257. PowerVisor will take the default width and height for the screen.
  258.  
  259. < prefs screen <enter>
  260. > -1 -1
  261.  
  262. For example, to make the screenheight equal to 1024 use the following
  263. command :
  264.  
  265. < prefs screen -1 1024 <enter>
  266.  
  267. You need to quit PowerVisor and start it again to see the result of this
  268. command.
  269.  
  270.  
  271. ====================== Setting the stack fail level ==========================
  272.  
  273. With 'prefs stack' you can set or get the amount of ¹stackspace left before
  274. PowerVisor will halt the task and give a warning (only if account is on
  275. with the 'account' command).
  276. The default value is 40.
  277.  
  278. < prefs stack <enter>
  279. > 00000028 , 40
  280.  
  281. Change it with :
  282.  
  283. < prefs stack 80 <enter>
  284.  
  285. Be careful not to make it too big, or else all tasks will be stopped even
  286. if nothing is wrong.
  287.  
  288.  
  289. ================ Setting default logical window parameters ===================
  290.  
  291. Using 'prefs logwin' you can set or get default parameters for the standard
  292. logical windows ('Main', 'Extra', 'Refresh', 'Debug', 'Rexx' and 'PPrint').
  293.  
  294. Four values are remembered for each ³standard logical window :
  295.  
  296.    - the ³number of columns
  297.        - if 0 we scale the number of columns to the visible size at the
  298.          moment the logical window is created. After that the number of
  299.          columns is fixed
  300.        - if -1 we use horizontal autoscale. The number of columns is adapted
  301.          to the visible size everytime the horizontal visible size changes.
  302.          The disadvantage of this is that the logical window is cleared
  303.        - every other value sets a fixed number of columns
  304.    - the ³number of rows
  305.        - (like the number of columns)
  306.    - the ²flag mask
  307.    - the flag values in this mask
  308.  
  309. The following flags are supported (also see the 'Screen' chapter) :
  310. (bit 0/bit 1)
  311.    -MORE- disable/enable      4
  312.    top-visible/real-top       32
  313.    statusline on/off          64
  314.    interrupt on/off           128
  315.    auto output snap           256
  316. All other bits are used or reserved and should not be used in the mask.
  317.  
  318. For example. To set the ²-MORE- check off, the statusline off and leave
  319. all other flags as default you can use :
  320.    mask  = 4+64
  321.    value = 64
  322.  
  323. Or with -MORE- check on :
  324.    mask  = 4+64
  325.    value = 4+64
  326.  
  327. The following default values are used when a logical window is opened :
  328.    -MORE- disabled
  329.    ¹Interrupt/Pause enabled
  330.    ²Home position is top-visible
  331.    ²Status line on
  332.    ³Auto Output Snap off
  333.  
  334. The standard logical windows have the following defaults (Note that the
  335. -MORE- setting of the 'Main' logical window is dependent on the
  336. 'mode' command) :
  337.  
  338.    - Main      (0,0,160,0)
  339.                number of columns and rows is set to a fixed value. This value
  340.                is the maximum number of columns and rows at the time the
  341.                logical window is created.
  342.  
  343.                Interrupt/Pause enabled
  344.                Home position is top-visible
  345.                Auto Output Snap is on
  346.  
  347.    - Extra     (0,0,160,0)
  348.                number of columns and rows is set to a fixed value. This value
  349.                is the maximum number of columns and rows at the time the
  350.                logical window is created.
  351.  
  352.                Interrupt/Pause enabled
  353.                Home position is top-visible
  354.                Auto Output Snap is on
  355.  
  356.    - Refresh   (0,50,160,160)
  357.                the number of columns is set to a fixed value. This value is
  358.                the maximum number of columns at the time the logical window
  359.                is created. The number of rows is fixed and always set to
  360.                50.
  361.  
  362.                Interrupt/Pause disabled
  363.                Home position is real-top
  364.                Auto Output Snap is off
  365.  
  366.    - Debug     (90,42,160,160)
  367.                the number of columns is fixed and set to 82. The number of
  368.                rows is fixed and set to 42.
  369.  
  370.                Interrupt/Pause disabled
  371.                Home position is real-top
  372.                Auto Output Snap is off
  373.  
  374.    - Rexx      (0,50,160,128)
  375.                the number of columns is set to a fixed value. This value is
  376.                the maximum number of columns at the time the logical window
  377.                is created. The number of rows is fixed and always set to
  378.                50.
  379.  
  380.                Interrupt/Pause disabled
  381.                Home position is top-visible
  382.                Auto Output Snap is off
  383.  
  384.    - PPrint    (0,50,160,128)
  385.                the number of columns is set to a fixed value. This value is
  386.                the maximum number of columns at the time the logical window
  387.                is created. The number of rows is fixed and always set to
  388.                50.
  389.  
  390.                Interrupt/Pause disabled
  391.                Home position is top-visible
  392.                Auto Output Snap is off
  393.  
  394. To get the defaults :
  395.  
  396. < prefs logwin debug <enter>
  397. > 90 42 00A0 00A0
  398.  
  399. To set other defaults :
  400.  
  401. < prefs logwin debug 100 50 160 160 <enter>
  402.  
  403. You need to quit PowerVisor and start it again to see the result of this
  404. command when applied to the 'Main' logical window. For all other logical
  405. windows you can simple close/open them to see the changes. You can also
  406. use the 'setflags' command to set the flags for a logical window
  407. immediatelly (also for 'Main'), and the 'colrow' command to set the
  408. ³number of columns and rows immediatelly.
  409.  
  410.  
  411. ===================== The default commandline length =========================
  412.  
  413. With 'prefs linelen' you can set or get the maximum length of the
  414. ²stringgadget commandline. This is also the maximum number of characters that
  415. may be used in ¹scripts (not ²ARexx scripts). The default is 400. Note that
  416. PowerVisor uses 800 bytes with a linelength of 400 (always double).
  417.  
  418. To get the default :
  419.  
  420. < prefs linelen <enter>
  421. > 00000190 , 400
  422.  
  423. To set another value :
  424.  
  425. < prefs linelen 1000 <enter>
  426.  
  427. You need to quit PowerVisor and start it again to see the result of this
  428. command.
  429.  
  430.  
  431. ========================= Some debug preferences =============================
  432.  
  433. With 'prefs debug' you can set or get some preferences for the ¹debugger.
  434. The first argument is the ³number of instructions to disassemble after
  435. each ¹trace and the second argument is 0 or 1 if you want the disassemble
  436. the ²previous instruction (no or yes resp.) after each trace. The values
  437. set with this command are also used by the ²fullscreen debugger.
  438. Default is 5,1. This means 5 instructions and yes, disassemble the previous
  439. executed instruction too.
  440.  
  441. < prefs debug <enter>
  442. > 00050001 , 327681
  443.  
  444. You can set other values using :
  445.  
  446. < prefs debug 15 0 <enter>
  447.  
  448. (15 instructions and no previous instruction)
  449.  
  450.  
  451. =============================== Debug mode ===================================
  452.  
  453. Using 'prefs dmode' you can set the information that should be displayed
  454. after a trace. This parameter is not used by the ²fullscreen debugger since
  455. the fullscreen debugger always shows all information.
  456.  
  457. You can set the following parameters :
  458.  
  459.    n        show no info at all. This is useful when you are using the
  460.             fullscreen debugger and you do not want to be disturbed
  461.             by output on the current logical window
  462.    r        show only ¹registers
  463.    c        show only code (using the format describe in the previous
  464.             section)
  465.    f        show registers and code (default)
  466.  
  467. For example :
  468.  
  469. < prefs dmode n <enter>
  470.  
  471.  
  472. ============================= Installing pens ================================
  473.  
  474. Every color you see on the PowerVisor screen or window can be changed.
  475. You can do this with the 'color' command. This command changes the
  476. RGB values for a color. The disadvantage is of course that this change
  477. affects all uses of that color. But don't worry, PowerVisor gives you
  478. the option to change virtually every color. This is because PowerVisor
  479. uses a pen array (the idea is stolen from AmigaDOS 2.0) to access each
  480. color. Using 'prefs pens' you can view or change this pen array.
  481.  
  482. There are 48 ¹pens. The first 24 are for ²fancy screens (2 or more
  483. bitplane screens) and the last 24 are for 1 bitplane screens. Only the first
  484. 19 pens are used for both the fancy and no-fancy screens. The other pens
  485. are reserved for future use.
  486.  
  487. With no arguments this command lists all pens on two lines: the
  488. first line containing all pens for fancy screens and the second
  489. line for no-fancy screens.
  490.  
  491. Here follow the currently defined pen numbers and there default
  492. color values. Add 24 to the pen number to get the no-fancy screen
  493. pen number :
  494.  
  495.    nr    name                 default fancy     default no-fancy
  496.    -------------------------------------------------------------
  497.    0     BoxBackground        0                 0
  498.    1     LogWinBackground     0                 0
  499.    2     NormalText           1                 1
  500.    3     PrompText            1                 1
  501.    4     StatusTextInActive   1                 1
  502.    5     StatusTextActive     2                 0
  503.    6     InActiveBar          0                 0
  504.    7     ActiveBar            3                 1
  505.    8     TopLeft3D            2                 1
  506.    9     BottomRight3D        1                 1
  507.    10    BoxLine              1                 1
  508.    11    PositionBox          0                 0
  509.    12    TopLeftBox           1                 1
  510.    13    BottomRightBox       2                 1
  511.    14    PositionIndicator    3                 1
  512.    15    SGInActiveText       3                 1
  513.    16    SGInActiveBackground 0                 0
  514.    17    SGActiveText         1                 1
  515.    18    SGActiveBackground   0                 0
  516.  
  517. (To see the effect of pen changes you should open/close your windows first.
  518. For most pens the effect is immediatelly visible and for some pens (like
  519. the SG... pens) the change is only visible after exiting PowerVisor)
  520.  
  521.  
  522. The 'BoxBackground' pen is used to draw the background of a box (see the
  523. 'Screen' tutor file for more information about boxes). This pen color is
  524. usually the same as the 'LogWinBackground' pen explained below. If you
  525. insist on using another value you will see a small border in each of your
  526. logical windows. This small border will grow if you make the number of
  527. columns and lines in the logical window smaller than the visible size
  528.  
  529. The 'LogWinBackground' pen is the background pen used in a logical window.
  530. This pen is only used on places where characters CAN appear. This explains
  531. the small border that you see when you change the 'BoxBackground' pen. The
  532. small border is the region of the logical windows where no characters can
  533. appear
  534.  
  535. The 'NormalText' pen is used to print all text in logical windows. This
  536. pen should be different from 'LogWinBackground', otherwise you will see
  537. nothing
  538.  
  539. The 'PromptText' pen is used to print the prompt (the current list
  540. indicator). This pen should be different from 'BoxBackground', otherwise
  541. the prompt will be invisible
  542.  
  543. The 'StatusTextInActive' pen is used to print the name of the logical
  544. window in the logical window bar when the logical window is inactive
  545. (the active logical window is the window where you can scroll)
  546.  
  547. The 'StatusTextActive' pen is used to print the name of the logical window
  548. in the logical window bar when the logical window is active
  549.  
  550. The 'InActiveBar' pen is used as background for the logical window bar
  551. when the logical window is inactive. This pen should be different from
  552. 'StatusTextInActive'
  553.  
  554. The 'ActiveBar' pen is used as background for the logical window bar
  555. when the logical window is active. This pen should be different from
  556. 'StatusTextActive'
  557.  
  558. The 'TopLeft3D' and 'BottomRight3D' pens are used for all 3D borders
  559. (at this moment only the border round the logical window bar uses these
  560. pens). The 'TopLeft3D' pen should be a light color and 'BottomRight3D'
  561. should be dark. This is to ensure the raised 3D effect of the border
  562.  
  563. The 'BoxLine' pen is used to draw the line between horizontally arranged
  564. logical windows. It should be different from 'BoxBackground'
  565.  
  566. The 'PositionBox' pen is used to draw the background of the position
  567. indicator at the right of the logical window bar
  568.  
  569. The 'TopLeftBox' and 'BottomRightBox' pens are used for the recessed
  570. 3D border round the position indicator. Note that this border is
  571. dithered when PowerVisor is in no-fancy mode
  572.  
  573. The 'PositionIndicator' pen is used for the little knob in the
  574. position indicator. This pen should be different from the 'PositionBox'
  575. pen
  576.  
  577. 'SGInActiveText' is used for the color of the text when the stringgadget
  578. is inactive (only AmigaDOS 2.0)
  579.  
  580. 'SGInActiveBackground' is used for the color of the stringgadget background
  581. when it is inactive (only AmigaDOS 2.0)
  582.  
  583. 'SGActiveText' is used for the color of the text when the stringgadget
  584. is active (only AmigaDOS 2.0)
  585.  
  586. 'SGActiveBackground' is used for the color of the stringgadget background
  587. when it is active (only AmigaDOS 2.0)
  588.  
  589.  
  590. Example :
  591.  
  592.  
  593. < prefs pens <enter>
  594. > 0 0 1 1 1 2 0 3 2 1 1 0 1 2 3 3 0 1 0 0 0 0 0 0
  595. > 0 0 1 1 1 0 0 1 1 1 1 0 1 1 1 1 0 1 0 0 0 0 0 0
  596.  
  597.  
  598. Change the color of normal text to blue (or the color installed on
  599. color 3) :
  600.  
  601. < prefs pens 2 3 <enter>
  602.  
  603.  
  604. ======================== Setting the default font ============================
  605.  
  606. With the 'setfont' command it is possible the set the font for one logical
  607. window. But this command only sets the font for the text in the logical
  608. window. The font is not set for the size bar. With the 'prefs font' command
  609. you can set the default font used by everything in PowerVisor. This default
  610. font is used by all logical windows (except when you 'setfont' them with
  611. another font), the stringgadget, the screen titlebar and the size bars
  612. between all logical windows.
  613.  
  614.  
  615. Example :
  616.  
  617.  
  618. < prefs font <enter>
  619. > topaz.font : 8 0 0
  620.  
  621. This is the default (topaz.font, size 8, style 0 and flags 0)
  622.  
  623. If you want to use topaz.font 9 for example you can use :
  624.  
  625. < prefs font topaz.font 9 0 0 <enter>
  626. < saveconfig <enter>
  627. < quit <enter>
  628.  
  629. CLI< run pv <enter>
  630.  
  631. And the default font for everything will be topaz 9.
  632.  
  633.  
  634. ============================= The config file ================================
  635.  
  636. All parameters set with the 'mode' or 'prefs' command can be saved using
  637. the 'saveconfig' command. This command will create a file called
  638. ¹s:PowerVisor-config. If this file is not present when PowerVisor starts,
  639. the default values are used.
  640.  
  641. Example :
  642.  
  643. < saveconfig <enter>
  644.  
  645.  
  646. ======================= Other installation factors ===========================
  647.  
  648. There are still other things that you can install. But these things are not
  649. saved in the s:PowerVisor-config file. If you want to set them automatically
  650. you'll have to include the right commands in the ¹s:PowerVisor-startup file.
  651. See the 'Scripts' tutor file for more information about scripts in general.
  652.  
  653.  
  654. =========================== Setting the colours ==============================
  655.  
  656. With the 'color' command you can set the default ¹colours for the PowerVisor
  657. screen.
  658.  
  659. Example, to get the ²3D colours used by ²Workbench 2.0 when you have opened
  660. PowerVisor on a ²2 bitplane screen you can use :
  661.  
  662. < color 0 10 10 10 <enter>
  663. < color 1 0 0 0 <enter>
  664. < color 2 15 15 15 <enter>
  665. < color 3 6 7 9 <enter>
  666.  
  667. If you use these values the 3D design (the ¹statusline) will be very nice.
  668.  
  669. You can't use the 'color' command when PowerVisor is on another screen.
  670.  
  671.  
  672. ========================= Setting alias commands =============================
  673.  
  674. Using the ¹¹'alias' command you can ³define other commands.
  675. See the 'CommandReference' file for more details.
  676. Note that there are already a lot of predefined aliases in the
  677. s:PowerVisor-startup file. See the 'Aliases' reference file for more
  678. information about these aliases.
  679.  
  680.  
  681. Some extra examples :
  682.  
  683.  
  684. < alias lfd 'loadfd [] fd:[]_lib.fd' <enter>
  685.  
  686. You have defined a command 'lfd'. When you type something like :
  687.  
  688. < lfd exec <enter>
  689.  
  690. The command will be expanded and the following command will be executed :
  691.  
  692. < loadfd exec fd:exec_lib.fd <enter>
  693. > ...
  694.  
  695. This command loads an ¹fd-file in memory.
  696.  
  697.  
  698. < alias opwin '{openpw [] 0 0 300 200;openlw [] [] 80 40}' <enter>
  699.  
  700. Defines an alias 'opwin' that opens a ²physical window and a ²logical window
  701. in this physical window.
  702.  
  703.  
  704. If you use the group operator in the alias string, alias expansion will
  705. be done again. So you can use aliases in an alias allowing for recursive
  706. alias definitions. The following two commands define a new command 'fact'
  707. to compute the facultaty of its argument :
  708.  
  709. < alias _fact 'void if(([])==1,1,{_fact ([])-1}*([]))' <enter>
  710. < alias fact 'disp {_fact []}' <enter>
  711.  
  712. < fact 5 <enter>
  713. > 00000078 , 120
  714.  
  715. '_fact' is the ²recursive alias. 'fact' is only provided to give a more
  716. command like syntax. Note that this recursion is limited by both
  717. the available stack (PowerVisor will give an error when the end of
  718. the stack is getting close) and the maximum length of the commandline
  719. (you can increase this maximum length with the 'prefs' command).
  720.  
  721.  
  722. If you want to use [] in the string you can use quotes :
  723.  
  724. < alias test 'print \\[\\]' <enter>
  725.  
  726. The first ²string expansion leads to the definition of 'test' as the command
  727. 'print \[\]'. The expansion done by 'print' leads to the correct execution.
  728.  
  729.  
  730. ======================= Attaching commands to keys ===========================
  731.  
  732. Using the 'attach' command you can ³³attach a command to a key (such
  733. a key with a command attached to it is called a macro)
  734.  
  735.  
  736. Example :
  737.  
  738.  
  739. To add the 'list' command to the <F1> key you can use :
  740.  
  741. < attach 'list' 050 0 <enter>
  742.  
  743. If you press <F1> 'list' is put on the stringgadget and an enter is
  744. simulated (this means that 'list' is also put in the history buffer).
  745.  
  746. If you do not want the stringgadget to be disturbed you can use :
  747.  
  748. < attach 'list' 050 0 e <enter>
  749.  
  750. Some other examples :
  751.  
  752. < attach '{pv 26 \({pv 12},%s);pv 4;pv 5}' 046 32 e <enter>
  753.  
  754. This command defines the <r-alt>+<del> key. When you press this key
  755. the command currently in the stringgadget will be deleted from the
  756. ²history buffer. The 'pv' command is a shorthand for 'pvcall' and this
  757. is a command normally only provided for ¹wizards (see the last section
  758. of this chapter).
  759.  
  760. With 'remattach' you can remove ¹macros.
  761.  
  762.  
  763. ================================== Files =====================================
  764.  
  765. If you like you can change the ²online help file. Read the ¹'QuickHelp'
  766. document for more information about the quickhelp file format.
  767.  
  768. Note that if you start a line in the online help file with a '¬' it will
  769. not be printed on screen (with the 'help' command).
  770.  
  771. When you have changed the online help file you must update s/PowerVisor-ctrl
  772. with the following command :
  773.  
  774. CLI< makehelp s:PowerVisor-help s:PowerVisor-ctrl word 2 <enter>
  775.  
  776.  
  777. You can also change the ²error file s/PowerVisor-errors. Each line in
  778. this file must always be 70 bytes long (including the newline).
  779. The first line in the file corresponds with error -6.
  780.  
  781.  
  782. If you use the AmigaDOS 2.0 version of PowerVisor you can also use
  783. menus. All menus PowerVisor uses are in the s:PowerVisor-menus file.
  784. Each line in this file has the following format (spaces are not
  785. important) :
  786.  
  787.    <command> [<title string> [<command string> [<shortcut>] ] ]
  788.  
  789. <command> is one of
  790.  
  791.    'title' for a menu titlebar
  792.    'item' for a menu item
  793.    'sub' for a sub item
  794.    'ibar' for a horizontal bar in an item menu
  795.    'sbar' for a horizontal bar in a sub menu
  796.    'end' to end the menus (is required)
  797.  
  798. The other strings are strings in the PowerVisor syntax. This means that
  799. you can use quotes (or MUST use quotes if there are spaces in the
  800. string or other special things not supported in names (see the 'Expressions'
  801. tutorial file)) or not (simple names).
  802.  
  803. The 'title' command only uses the <title string>
  804. The 'item' command uses the <title string> and if the item has no
  805.    sub menus the <command string> is also used
  806.    <shortcut> is optional
  807. The 'sub' item used the <title string> and the <command string>
  808.    <shortcut> is optional
  809. The other commands have no <title string>, <command string> or <shortcut>
  810.  
  811.  
  812. Example :
  813.  
  814. > title Project
  815. >    item 'About' 'print \'Hello world\\0a\''
  816. >    ibar
  817. >    item Quit quit Q
  818. >
  819. > title misc
  820. >    item 'Testing it' 'disp 1' '1'
  821. >    item 'Testing it 2' '{disp 1;disp 2}'
  822. >    item 'Sub menus'
  823. >       sub 'Sub 1' 'disp 1'
  824. >       sub 'Sub 2' 'disp 2' '2'
  825. > end
  826.  
  827.  
  828. ============================= Logical windows ================================
  829.  
  830. Although there are already a lot of logical window parameters you can set
  831. with the 'prefs' command, there can be times that you need more. See the
  832. 'Screen' chapter to see how you can open logical and physical windows.
  833.  
  834. Here is an example :
  835.  
  836. This sequence of commands opens two extra logical and physical windows
  837. and ¹tile them in a certain fashion :
  838.  
  839. Make the 'Main' physical window a ²non-backdrop window :
  840. < screen 0 <enter>
  841. Go to two bitplane mode and interlace :
  842. < mode fancy lace <enter>
  843. Open two physical windows and two logical windows :
  844. < openpw debug 0 0 500 200 <enter>
  845. < openpw rexx 500 0 140 200 <enter>
  846. < openlw debug debug 82 42 <enter>
  847. < openlw rexx rexx 80 40 <enter>
  848. Size the main physical window :
  849. < size main 640 200 <enter>
  850. < move main 0 200 <enter>
  851.  
  852.  
  853. ============================== And last ... ==================================
  854.  
  855. And last for the maximum flexibility... the 'PVCALL' command !
  856.  
  857. Note that this command is not for the casual user. It is also not for the
  858. experienced PowerVisor user. It is for the PowerVisor ¹wizard :-)  !!!
  859.  
  860. See the 'TheWizardCorner' file if you think you are a wizard.
  861.